function my_hobby() {
    let hps = document.querySelectorAll(".hobby_piece");
    for (let hp of hps) {
      let max_value = hp.querySelector(".percent").title;
      let vp = hp.querySelector(".visual_per");
      let per = hp.querySelector(".percent")
      //1：改变vp宽度 同时改变percent内的百分比
      let value = 0;
      let random_speed = Math.random() / 5 + 0.1;
      let id = setInterval(function () {
        value = value + random_speed;
        vp.setAttribute("style", `width:${value}%`)
        per.firstChild.nodeValue = Math.round(value) + "%";
        if (value > max_value) {
          clearInterval(id);
        }
      }, 5);
    }
  }

//如果用户刷新，且此时在hobby栏中，则直接加载动画，否则，待滚轮滑下至hobby时，加载动画
  function Refresh_load() {
    let hp = document.querySelector(".hobby_piece");
    let windowH = window.innerHeight;
      let obj = GetRect(hp);
      //判断是否处于hobby栏
      if (
        obj.top < windowH &&
        obj.bottom > 0 &&
        obj.bottom < windowH
      ) {
        window.onload = function () {
          my_hobby();
        }
      } else {
        Rolling_in("hobby_piece", my_hobby, 1);
    }
  }
  Refresh_load();